import { ApiProperty } from '@nestjs/swagger';

export class CommonDataDto<T> {
  /**
   * 业务响应码
   * @example 0
   */
  code: number;

  /**
   * @example 'success'
   */
  message: string;

  // @ApiProperty 调用覆盖重置配置，避免AST解析循环依赖问题
  @ApiProperty()
  data: T;
}

export class CommonDataNumberDto {
  data: number;
}

export class CommonDataBooleanDto {
  data: boolean;
}

export class CommonDataStringDto {
  data: string;
}
